<template>
	<view>
		<u-navbar :is-back="false" title="" :border-bottom="false">
			<view class="slot-wrap">
				<view class="topBox">
					<view class="left-input">
						<image src="../../static/images/home/searh.png" mode=""></image>
						<u-input v-model="value" type="text" :border="false" :clearable="false" placeholder="关键词搜索" />
					</view>
					<view class="right-img" @click="goMessage">
						<image src="../../static/images/home/message.png" mode=""></image>
						<view class="num">
							5
						</view>
					</view>
				</view>
			</view>
		</u-navbar>
		<view class="content">
			<view class="top-content">
				<image src="../../static/images/develop/hometopicon.png" mode=""></image>
			</view>
			<view class="top-flex-box">
				<view class="top-item seeker-item" @click="goSeeker">
					<image src="../../static/images/home/seekericon.png" mode=""></image>
					<view>
						求职管理
					</view>
				</view>
				<view class="top-item resume-item" @click="goResume">
					<image src="../../static/images/home/resumeicon.png" mode=""></image>
					<view>
						我的简历
					</view>
				</view>
				<view class="top-item collect-item" @click="goCollect">
					<image src="../../static/images/home/collecticon.png" mode=""></image>
					<view>
						我的收藏
					</view>
				</view>
			</view>
		</view>
		<view class="fill">

		</view>
		<view class="select-box">
			<view class="select-item" @click="showType=true">
				{{ jobType }}
				<image src="../../static/images/home/selecticon.png" mode=""></image>
			</view>
			<view class="select-item select-city" @click="showCity=true">
				{{ city }}
				<image src="../../static/images/home/selecticon.png" mode=""></image>
			</view>
		</view>
		<view class="job-box">
			<block v-for="(item,index) in list" :key="index">
				<job-item :item="item">
					
				</job-item>
			</block>
		</view>
		<u-tabbar :list="vuex_tabbar" active-color="rgba(211,176,104,1)" inactive-color="rgba(153,153,153,1)" height="98"></u-tabbar>
		<u-picker v-model="showCity" mode="region" :params="params" :default-region="['四川省', '成都市']" @confirm="selectCity"></u-picker>
		<u-select v-model="showType" mode="mutil-column-auto" :list="kindList" @confirm="selectJobType"></u-select>
	</view>
</template>

<script>
	import multipleMixin from '@/mixin/multiple-data-mixin';
	export default {
		mixins:[multipleMixin],
		data() {
			return {
				showCity: false,
				showType: false,
				city: '区域',
				jobType:'建筑木工',
				value: '',
				list:[{id:1},{id:2},{id:3}]
			}
		},
		onLoad() {

		},
		methods: {
			goDetails(index){
				console.log(index)
			},
			goMessage(){
				this.$u.route({
					url: 'pages/home/message/message',
				})
			},
			goCollect(){
				this.$u.route({
					url: 'pages/home/collect/index',
				})
			},
			goResume(){
				this.$u.route({
					url: 'pages/home/resume/index',
				})
			},
			goSeeker(){
				this.$u.route({
					url: 'pages/home/seeker/index',
				})
			},
			selectJobType(e) {
				console.log(e,234)
				this.jobType = e[2].label
			},
			selectCity(e) {
				console.log(e, 194)
				this.city = e.city.label;
			}
		}
	}
</script>

<style scoped lang="scss">
	.slot-wrap {
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		width: 100%;
		box-sizing: border-box;

		.topBox {
			width: 100%;
			display: flex;

			.left-input {
				flex: 1;
				display: flex;
				background: rgba(242, 242, 242, 1);
				opacity: 1;
				border-radius: 100rpx;
				padding: 0 28rpx;

				image {
					margin-right: 15rpx;
					margin-top: 22rpx;
					width: 29rpx;
					height: 29rpx;
				}
			}

			.right-img {
				width: 62rpx;
				height: 68rpx;
				margin-left: 4rpx;
				position: relative;

				image {
					width: 62rpx;
					height: 68rpx;
				}

				.num {
					position: absolute;
					top: 0;
					right: -6rpx;
					width: 30rpx;
					height: 30rpx;
					background: rgba(255, 32, 32, 1);
					border-radius: 50%;
					opacity: 1;
					line-height: 30rpx;
					text-align: center;
					font-size: 22rpx;
					font-weight: 400;
					color: rgba(255, 255, 255, 1);
				}
			}
		}
	}

	.content {
		background: #FFFFFF;
		width: 100%;
		box-sizing: border-box;
		padding-top: 16rpx;
		padding-bottom: 40rpx;

		.top-content {
			padding: 0rpx 30rpx;

			image {
				width: 100%;
				height: 260rpx;
			}
		}

		.top-flex-box {
			display: flex;
			justify-content: space-around;
			padding: 0 50rpx;
			margin-top: 52rpx;

			.top-item {
				text-align: center;
				font-size: 22rpx;
				font-weight: 400;
				line-height: 30rpx;
				color: rgba(51, 51, 51, 1);
				opacity: 1;
			}

			.seeker-item {
				image {
					width: 74rpx;
					height: 68rpx;
					margin-bottom: 15rpx;
				}
			}

			.resume-item {
				image {
					width: 58rpx;
					height: 68rpx;
					margin-bottom: 15rpx;
				}
			}

			.collect-item {
				image {
					width: 50rpx;
					height: 68rpx;
					margin-bottom: 15rpx;
				}
			}
		}
	}

	.fill {
		width: 100%;
		height: 10rpx;
		background: rgba(245, 245, 245, 1);
	}

	.select-box {
		width: 100%;
		border-bottom: 1rpx solid #DFDFDF;
		padding: 28rpx 0rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-around;
		align-content: center;

		.select-item {
			text-align: center;
			font-size: 26rpx;
			font-weight: bold;
			line-height: 35rpx;
			color: rgba(51, 51, 51, 1);
			opacity: 1;
			display: flex;

			image {
				width: 24rpx;
				height: 12rpx;
				margin-top: 13rpx;
				margin-left: 14rpx;
			}
		}

		.select-city {
			// margin-left: 230rpx;
		}
	}

	.job-box {
		padding: 30rpx 40rpx 0;
		box-sizing: border-box;
		width: 100%;
	}
</style>
